package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreProductSummaryMapper;
import com.ruoyi.system.domain.StoreProductSummary;
import com.ruoyi.system.service.IStoreProductSummaryService;

/**
 * 门店商品汇总 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-26
 */
@Service
public class StoreProductSummaryServiceImpl implements IStoreProductSummaryService
{
    @Autowired
    private StoreProductSummaryMapper storeProductSummaryMapper;

    /**
     * 通过id查询门店商品汇总
     *
     * @param id 门店商品汇总信息主键
     * @return 门店商品汇总
     */
    @Override
    public StoreProductSummary selectStoreProductSummaryById(Long id)
    {
        return storeProductSummaryMapper.selectStoreProductSummaryById(id);
    }

    /**
     * 查询门店商品汇总信息列表
     *
     * @param storeProductSummary 门店商品汇总
     * @return 门店商品汇总
     */
    @Override
    public List<StoreProductSummary> selectStoreProductSummaryList(StoreProductSummary storeProductSummary)
    {
        return storeProductSummaryMapper.selectStoreProductSummaryList(storeProductSummary);
    }

    /**
     * 新增门店商品汇总
     *
     * @param storeProductSummary 门店商品汇总
     * @return 结果
     */
    @Override
    public int insertStoreProductSummary(StoreProductSummary storeProductSummary)
    {
        return storeProductSummaryMapper.insertStoreProductSummary(storeProductSummary);
    }

    /**
     * 修改门店商品汇总
     *
     * @param storeProductSummary 门店商品汇总
     * @return 结果
     */
    @Override
    public int updateStoreProductSummary(StoreProductSummary storeProductSummary)
    {
        return storeProductSummaryMapper.updateStoreProductSummary(storeProductSummary);
    }

    /**
     * 通过id批量删除门店商品汇总信息
     *
     * @param ids 需要删除的门店商品汇总信息主键
     * @return 结果
     */
    @Override
    public int deleteStoreProductSummaryByIds(Long[] ids)
    {
        return storeProductSummaryMapper.deleteStoreProductSummaryByIds(ids);
    }

    /**
     * 通过id删除门店商品汇总信息
     *
     * @param id 门店商品汇总信息主键
     * @return 结果
     */
    @Override
    public int deleteStoreProductSummaryById(Long id)
    {
        return storeProductSummaryMapper.deleteStoreProductSummaryById(id);
    }
}
